# coding=utf-8
import staff.common as base


class System(base.Action):
    def staff_info_action(self, info):
        handle = {
            'add': self.add_staff_info,
            'del': self.del_staff_info,
            'mod': self.mod_staff_info,
            'get': self.get_staff_info,
            'list': self.list_staff_info,
            'exit': self.exit_staff_info,
            'help': self.help_staff_info,
        }
        try:
            action = info[0]  # 获取输入信息中的操作方法
            handle[action](info)
        except Exception:
            raise Exception("操作错误,请确认后重试！")
